n.for.crossover <- function(vard, delta, alpha=0.05, beta=0.2){
  n <- (vard * (qnorm(1-alpha/2)+qnorm(1-beta))^2) / (2*delta^2)
  return(n)
}